{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<script>\n",
       "    require.config({\n",
       "         paths:{\n",
       "           'echarts': '/nbextensions/echarts/echarts.min', 'India': '/nbextensions/echarts-countries-js/India'\n",
       "         }\n",
       "    });\n",
       "</script>\n",
       "<div id=\"34866ca7b8f146189119aa20c6703f9a\" style=\"width:800px; height:600px;\"></div>\n",
       "\n",
       "<script>\n",
       "    require([ 'echarts', 'India' ],function(ec){\n",
       "\tvar myChart = ec.init(document.getElementById('34866ca7b8f146189119aa20c6703f9a'));\n",
       "var option =  {\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"India\",\n",
       "            \"textStyle\": {\n",
       "                \"fontSize\": 18,\n",
       "                \"color\": \"#000\"\n",
       "            },\n",
       "            \"top\": \"auto\",\n",
       "            \"subtext\": \"\",\n",
       "            \"subtextStyle\": {\n",
       "                \"fontSize\": 12,\n",
       "                \"color\": \"#aaa\"\n",
       "            },\n",
       "            \"left\": \"auto\"\n",
       "        }\n",
       "    ],\n",
       "    \"backgroundColor\": \"#fff\",\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"roam\": true,\n",
       "            \"mapType\": \"\\u5370\\u5ea6\",\n",
       "            \"type\": \"map\",\n",
       "            \"label\": {\n",
       "                \"normal\": {\n",
       "                    \"textStyle\": {\n",
       "                        \"fontSize\": 12,\n",
       "                        \"color\": \"#000\"\n",
       "                    },\n",
       "                    \"show\": false,\n",
       "                    \"formatter\": null,\n",
       "                    \"position\": \"top\"\n",
       "                },\n",
       "                \"emphasis\": {\n",
       "                    \"textStyle\": {\n",
       "                        \"fontSize\": 12,\n",
       "                        \"color\": \"#fff\"\n",
       "                    },\n",
       "                    \"show\": true,\n",
       "                    \"position\": null\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"value\": 1,\n",
       "                    \"name\": \"Gujarat\"\n",
       "                },\n",
       "                {\n",
       "                    \"value\": 100,\n",
       "                    \"name\": \"Tamil Nadu\"\n",
       "                }\n",
       "            ],\n",
       "            \"symbol\": \"circle\",\n",
       "            \"name\": \"\",\n",
       "            \"showLegendSymbol\": true\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"selectedMode\": \"multiple\",\n",
       "            \"textStyle\": {\n",
       "                \"fontSize\": 12,\n",
       "                \"color\": \"#333\"\n",
       "            },\n",
       "            \"top\": \"top\",\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"left\": \"center\",\n",
       "            \"orient\": \"horizontal\"\n",
       "        }\n",
       "    ],\n",
       "    \"series_id\": 1354310,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\",\n",
       "        \"#f6f5ec\"\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"dimension\": null,\n",
       "        \"min\": 0,\n",
       "        \"type\": \"continuous\",\n",
       "        \"orient\": \"vertical\",\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"top\": \"bottom\",\n",
       "        \"textStyle\": {\n",
       "            \"color\": \"#000\"\n",
       "        },\n",
       "        \"showLabel\": true,\n",
       "        \"splitNumber\": 5,\n",
       "        \"left\": \"left\",\n",
       "        \"text\": [\n",
       "            \"high\",\n",
       "            \"low\"\n",
       "        ],\n",
       "        \"calculable\": true,\n",
       "        \"max\": 100\n",
       "    },\n",
       "    \"tooltip\": {\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14,\n",
       "            \"color\": \"#fff\"\n",
       "        },\n",
       "        \"trigger\": \"item\",\n",
       "        \"formatter\": null,\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"triggerOn\": \"mousemove|click\"\n",
       "    },\n",
       "    \"toolbox\": {\n",
       "        \"top\": \"center\",\n",
       "        \"show\": true,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"left\": \"95%\",\n",
       "        \"feature\": {\n",
       "            \"saveAsImage\": {\n",
       "                \"title\": \"\\u4e0b\\u8f7d\\u56fe\\u7247\",\n",
       "                \"show\": true\n",
       "            },\n",
       "            \"dataView\": {\n",
       "                \"show\": true\n",
       "            },\n",
       "            \"restore\": {\n",
       "                \"show\": true\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "};\n",
       "myChart.setOption(option);\n",
       "\n",
       "    });\n",
       "</script>\n"
      ],
      "text/plain": [
       "<pyecharts.charts.map.Map at 0x7fefcc6511d0>"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts import Map\n",
    "\n",
    "value = [1, 100]\n",
    "attr = ['Gujarat', 'Tamil Nadu']\n",
    "map = Map('India', width=800, height=600)\n",
    "map.add('', attr, value, maptype=u'印度', is_visualmap=True, visual_text_color=\"#000\")\n",
    "map"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
